package cn.hj.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {

    //当前页
    private Integer currentPage = 1;

    //单页显示数据量
    private Integer pageSize  = 5;

    //搜索关键字
    private String keyWords;

    //起始下标页
    public Integer getBeginIndex(){
        return (this.currentPage-1)*this.pageSize;
    }
}
